package ysq.xyg.util;

import java.util.List;

/**
 * @author yu sheng qiang
 * @create 2017-03-22 16:43
 **/
public final class BaseConstant {
    //常用状态
    public static String CODE_SUCCESS = "success";//操作成功
    public static String CODE_ERROR="error";//操作失败
    public static Integer CODE_AUTOLOGIN_Y=1;//自动登录
    public static Integer CODE_AUTOLOGIN_N=2;//非自动登录
    public static String COOKIE_LOGINNAME="COOKIE_LOGINNAME";//保存到COOKIE中登录名信息
    public static String COOKIE_PASSWORD="COOKIE_PASSWORD";//保存到COOKIE中登录密码信息
    public static String SESSION_USERINFO="SESSION_USERINFO";//保存到Session中信息
    //错误提醒
    public static String LOGIN_ERROR_NOID="登录名不存在！";
    public static String LOGIN_ERROR_PSW="登录名与密码不一致！";
    public static String DATABASE_ERROR_DELETE="删除失败!";
    public static String CHARID_ERROR_DELETE="请先删除子类菜单!";
    public static String DATABASE_ERROR_INSERT="添加失败!";
    public static String DATABASE_ERROR_UPDATE="修改失败!";
    public static String DATABASE_ERROR_CANSHU="参数错误!";
    public static String DATABASE_ERROR_BUCHUNZAI="没有匹配的数据!";
    public static String LOGIN_USERIS_Y="登录名【NAME】已经存在!";
    public static String WEBAWARD_FAILL="验证码无效！";
    public static String WECHAT_PAY_FAILL="微信支付失败！";
    //数据保存模板
    public static String data_user_templet="{\"id\":\"ID\",\"password\":\"PASSWORD\",\"name\":\"NAME\"}";
    public static String CAPTCHA="【一元购】您的验证码是CAPTCHA。若非本人操作请忽略此消息。";

    /** 分页默认参数 */
    public static final int PAGE_NUM = 1;
    public static final int PAGE_SIZE = 15;
    //标志
    public static final String REMOVE_Y="Y";
    public static final String REMOVE_N="N";
    //操作状态
    public static int SUCCESS=1;
    public static int FAIL=2;
    public static int FAIL_CODE_THREE = 3;
    public static int FAIL_CODE_FOUR = 4;

    //菜单基本
    public static final String MENU_ONE="1";//一级菜单
    public static final String MENU_TWO="2";//二级菜单
    public static final String MENU_CODE_MIN="10";//菜单最小code值

    //菜单头部
    public  static final String HEAD_TITLE="<ul class=\"breadcrumb no-border no-radius b-b b-light pull-in\">\n" +
            "              <li><a href=\"javaScript:void(0);\"><i class=\"fa fa-home\"></i> 首页</a></li>\n" +
            "             CONTENT" +
            "            </ul>";
    //菜单头部上级页面
    public static final String HEAD_TITLE_BASE_CONTENT="<li><a href=\"HREF\">TITLE</a></li>";
    //菜单头部当前页面
    public static final String HEAD_TITLE_CURRENT_CONTENT="<li class=\"active\">TITLE</li>";
    //菜单href的默认内容
    public static final String HEAD_TITLE_HREF_CONTENT="javaScript:void(0);";

    //消费类型
    public static final String RECORD_TYPE_XFJL="1";//消费
    public static final String RECORD_TYPE_CZJL="2";//充值

    /**
     * 执行状态-成功
     */
    public static final String EXECUTE_STATE_SUCCESS = "成功";
    /**
     * 执行状态-失败
     */
    public static final String EXECUTE_STATE_FAIL = "失败";

    /** --------------   微信菜单类型   -------------------**/
    public static final String MENU_TYPE_CLICK = "click"; // 发送消息
    public static final String MENU_TYPE_VIEW = "view"; // 跳转链接

    public static final String WX_STATE_ONE = "1"; // 首页
    public static final String WX_STATE_TWO = "2"; // 品牌页面
    public static final String WX_STATE_THREE = "3"; // 商品页面
    //Oauth状态标识符
    public static final String OAUTH_BASE="1";
    public static final String OAUTH_USERINFO="2";
    //默认介绍人
    public static final String INTRODUCT_USER_ID="1";

    /**
     * 活动是否开启自动
     */
    public static final String ITEM_ACT_AUTO_YSE = "1";
    public static final String ITEM_ACT_AUTO_NO = "2";

    /**
     * 是否中奖：1.未中奖，2.已中奖
     */
    public static final String ACTIVITY_WINNUM_NO = "1";
    public static final String ACTIVITY_WINNUM_YES = "2";

    /**
     * 状态进行中or结束
     */
    public static final String ACTIVITY_ING = "1";
    public static final String ACTIVITY_ED = "2";

    /**
     * 中奖人
     */
    public static final String MEMBER_WINNUM_YES = "1";

    /**
     * 图像显示的大小
     */
    public static Integer ACTIVITY_SHOW_SIZE = 11;

    /**
     * 是否默认收货地址
     */
    public static final String DEFAULT_ADDRESS_YES = "1";
    public static final String DEFAULT_ADDRESS_NO = "2";

    /**
     * flag状态
     */
    public static final String BASE_FLAG_ZERO = "0";
    public static final String BASE_FLAG_ONE = "1";
    public static final String BASE_FLAG_TWO = "2";
    public static final String BASE_FLAG_THREE = "3";
    public static final String BASE_FLAG_FOUR = "4";

    /**
     * 1=未提现
     * 2=提现成功
     */
    public static final String WITHDRAW_STATUS_NO = "1";
    public static final String WITHDRAW_STATUS_YES = "2";

    /**
     * 1=管理员或收货员给用户充值
     * 2=管理员给收货员充值
     */
    public static final String RECORD_TO_MEMBER = "1";
    public static final String RECORD_TO_USER = "2";

    public static final int MEMBER_MIN_DEFAULT_ID = 30000;

    /**
     * 1=banner图
     * 2=其他
     */
    public static final String BANNER_IS_BANNER = "1";
    /**
     * 有效状态1、有效2、无效
     */
    public static final String STATUS_IS_YES = "1";
    public static final String STATUS_IS_NO = "2";
    /**
     * 活动状态1=进行中2=未开始3=已结束
     */
    public static final String ACTIVITY_TYPE_RUN = "1";
    public static final String ACTIVITY_TYPE_NORUN = "2";
    public static final String ACTIVITY_TYPE_END = "3";

    /**
     * 优惠券1=未使用2=使用
     */
    public static final String COUPON_STATUS_NO = "1";
    public static final String COUPON_STATUS_YES = "2";

    /**
     * 优惠券1=全部发送2=制定用户发送
     */
    public static final String COUPON_SEND_ALL = "1";
    public static final String COUPON_SEND_MEMBER = "2";

    /**
     * 状态:1、待支付，2、待发货，3、待收货
     */
    public static final String PAY_NO = "1";
    public static final String PAY_YES_NO_SEND = "2";
    public static final String PAY_YES_SEND = "3";

    /**
     * 判断活动是否已同步过商品
     */
    public static final String ACTIVITY_ACCEPT_ITEM_NO = "1";
    public static final String ACTIVITY_ACCEPT_ITEM_YES = "2";

    public static final Integer BASE_ORDER_NUM_ZERO = 0;
    public static final Integer BASE_ORDER_NUM_ONE = 1;

    /**
     * 商品是否有属性值
     */
    public static final String CART_SPECS_SEQ_YES = "2";

    public enum SchedulerStatus {
        /**
         * 正常
         */
        NORMAL("0"),
        /**
         * 暂停
         */
        PAUSE("1");

        private String value;

        private SchedulerStatus(String value)
        {
            this.value = value;
        }

        public String getValue()
        {
            return value;
        }
    }
}
